from wsgiref.simple_server import make_server
from basic_demo.demo18 import application
from basic_demo.demo18 import application2
# 创建一个服务器，IP地址为空，端口是8000，处理函数是application:
# httpd=make_server('',8000,application)
httpd=make_server('',8000,application2)
print('serving HTTP on port 8000...')
# 开始监听http请求
httpd.serve_forever()
# 启动成功后，打开浏览器，输入http://localhost:8000/，就可以看到结果了
# 按Ctrl+C终止服务器。